import request from '@/utils/request'

// 查询城市列表
export function listCity(query) {
  return request({
    url: '/sys/enterprise/cityList',
    method: 'post',
    params: query
  })
}

// 获取菜单树信息
export function selectTree() {
  return request({
    url: '/sys/menu/selectTree',
    method: 'post'
  })
}

// 重置密码
export function resetPwd(enterpriseId) {
  const data = {
    'enterpriseId': enterpriseId
  }
  return request({
    url: '/sys/enterprise/resetPwd',
    method: 'post',
    params: data
  })
}

// 修改企业到期时间
export function updateEnterpriseExpiryTime(data) {
  return request({
    url: '/sys/enterprise/updateEnterpriseExpiryTime',
    method: 'post',
    params: data
  })
}

// 查询企业日常列表信息
export function listDaily(query) {
  return request({
    url: '/sys/enterprise/dailyList',
    method: 'post',
    params: query
  })
}

// 用状态修改
export function changeStatusByIds(ids, status) {
  const data = {
    'ids': ids,
    'status': status
  }
  return request({
    url: '/sys/enterprise/changeStatusByIds',
    method: 'post',
    params: data
  })
}

// 查询企业初始话信息
export function selectByIdAndSubCompany(enterpriseId, subCompany) {
  return request({
    url: '/sys/enterprise/selectByIdAndSubCompany/' + enterpriseId + '/' + subCompany,
    method: 'get'
  })
}
// 根据企业套餐id查询菜单树menuIds[]
export function selectSysCompanyTempMenuIdsById(id) {
  const data = {
    'id': id
  }
  return request({
    url: '/sys/enterprise/selectSysCompanyTempMenuIdsById',
    method: 'post',
    params: data
  })
}

